<template>
    <div class="wechat">
        <!-- <vue-qr :correctLevel="3" :autoColor="false" colorDark="#313a90" :bgSrc="bgSrc" :logoSrc="logoSrc" :text="codeUrl"
            :size="95" :margin="0" :logoMargin="3"></vue-qr> -->
        <vue-qr :correctLevel="3" :autoColor="false" colorDark="#313a90" :text="codeUrl" :size="95" :margin="0"
            :logoMargin="3"></vue-qr>
    </div>
</template>
  
<script>

import { getCreateQr } from '@/api/permission/userWechat'
import VueQr from 'vue-qr'

export default {
    components: { VueQr },
    props: {
        user: {
            type: Object,
            default: () => {
                return {}
            }
        }
    },
    data() {
        return {
            // logoSrc: require('../assets/img/qrlogo.png'),
            // bgSrc: require('../assets/img/bgSrc.png'),
            codeUrl: ''
        }
    },
    computed: {

    },
    created() {
        this.getInfo();
    },
    methods: {
        getInfo() {
            getCreateQr(this.user.id).then(res => {
                this.codeUrl = res.url;
                console.log(res);
            })
        }
    }
}
</script>